import config from '@/config'
import http from '@/utils/request'

export default {
	list: {
		url: `${config.API_URL}/log/excelList`,
		name: '任务日志',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	opLogList: {
		url: `${config.API_URL}/log/opLogList`,
		name: '操作日志',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	BoardLogList: {
		url: `${config.API_URL}/log/dataBoardLogList`,
		name: '日志导出页列表',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	download: {
		url: `${config.API_URL}/log/download`,
		name: '获取导出的文件ID',
		get: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.get(this.url, data)
		},
	},
	upload: {
		url: `${config.API_URL}/file/upload`,
		name: '导入文件上传到云端',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		},
	},
	importExcel: {
		url: `${config.API_URL}/log/importExcel`,
		name: '获取上传云端返回的数据',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		},
	},
	approvalList: {
		url: `${config.API_URL}/approval/list`,
		name: '审批日志列表',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		},
	},
	approvalDetail: {
		url: `${config.API_URL}/approval/detail`,
		name: '审批日志详情',
		get: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.get(this.url, data)
		},
	},
	areasByApp: {
		url: `${config.API_URL}/logStat/areasByApp`,
		name: '获取应用片区',
		get: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.get(this.url, data)
		},
	},
	generalViewSub: {
		url: `${config.API_URL}/logStat/generalViewSub`,
		name: '总体访问情况',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		},
	},
	monthView: {
		url: `${config.API_URL}/logStat/monthView`,
		name: '月访问趋势',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		},
	},
	appModuleView: {
		url: `${config.API_URL}/logStat/appModuleView`,
		name: '应用模块访问统计分析',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		},
	},
	appSubModuleView: {
		url: `${config.API_URL}/logStat/appSubModuleView`,
		name: '应用模块访问统计分析',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		},
	},
	appAreaView: {
		url: `${config.API_URL}/logStat/appAreaView`,
		name: '片区访问统计分析',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		},
	},
}
